package com.keda.springdata_elasticsearch.service;


import com.keda.springdata_elasticsearch.page.Page;

import java.util.List;

/**
 * @Description:
 * @Auther: liuyanhui
 * @Date: 2023/01/20/ 10:53
 */
public interface BaseSearchService<T> {
    /**
     * 搜 索
     * @param keyword
     * @param clazz
     * @return
     */
    List<T> query(String keyword, Class<T> clazz);

    List<T> queryHit(String keyword, String[] fieldNames,Class<T> clazz);

    Page<List<T>> queryHitByPage(int pageNo, int pageSize, String keyword, String[] fieldNames, Class<T> clazz);

    void deleteIndex(Class<T> clazz);
}
